<?php
/**
 * @Name: AccountController.php
 * @Author: yashuai<1762910894@qq.com>
 * @Desc: 账户登录
 */

namespace App\Http\Controllers\Admin;

use App\Http\Logic\Rbac\LoginLogic;
use App\Http\Requests\Account\AccountPasswordRequest;

class AccountController
{

    /**
     * @Desc 账号密码登录
     * @param AccountPasswordRequest $request
     * @return \Illuminate\Http\JsonResponse
     * @throws \App\Exceptions\ThrowException
     * @author yashuai<1762910894@qq.com>
     */
    public function password(AccountPasswordRequest $request)
    {
        $result = LoginLogic::instance($request->getValidationData())->passwordAuth();
        return _success($result);
    }

}
